package com.jy.rhin.infra.repo.notfication.subscribe.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jy.rhin.infra.repo.notfication.subscribe.po.SubscribeTopicFilterPO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @Description:
 * @Author: lww
 * @Date: 2022/6/29 17:03
 */
@Repository
public interface SubscribeTopicFilterMapper extends BaseMapper<SubscribeTopicFilterPO> {

    /**
     * 清除指定订阅下关联的所有查询过滤条件
     *
     * @param subscribeId
     */
    @Delete("delete from t_notification_subscribe_filter where subscribe_id = #{subscribeId}")
    void removeQueryFilter(@Param("subscribeId") Long subscribeId);

}
